3.1.86 \(\int \frac {\sin ^6(c+d x)}{a+b \sin ^2(c+d x)} \, dx\) [86]

3.1.86.1 Optimal result
3.1.86.2 Mathematica [A] (verified)
3.1.86.3 Rubi [A] (verified)
3.1.86.4 Maple [A] (verified)
3.1.86.5 Fricas [A] (verification not implemented)
3.1.86.6 Sympy [F(-1)]
3.1.86.7 Maxima [A] (verification not implemented)
3.1.86.8 Giac [A] (verification not implemented)
3.1.86.9 Mupad [B] (verification not implemented)

3.1.86.1 Optimal result

Integrand size = 23, antiderivative size = 117 \[ \int \frac {\sin ^6(c+d x)}{a+b \sin ^2(c+d x)} \, dx=\frac {\left (8 a^2-4 a b+3 b^2\right ) x}{8 b^3}-\frac {a^{5/2} \arctan \left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{b^3 \sqrt {a+b} d}+\frac {(4 a-3 b) \cos (c+d x) \sin (c+d x)}{8 b^2 d}-\frac {\cos (c+d x) \sin ^3(c+d x)}{4 b d} \]

output
1/8*(8*a^2-4*a*b+3*b^2)*x/b^3+1/8*(4*a-3*b)*cos(d*x+c)*sin(d*x+c)/b^2/d-1/ 
4*cos(d*x+c)*sin(d*x+c)^3/b/d-a^(5/2)*arctan((a+b)^(1/2)*tan(d*x+c)/a^(1/2 
))/b^3/d/(a+b)^(1/2)
 
3.1.86.2 Mathematica [A] (verified)

Time = 0.51 (sec) , antiderivative size = 95, normalized size of antiderivative = 0.81 \[ \int \frac {\sin ^6(c+d x)}{a+b \sin ^2(c+d x)} \, dx=\frac {4 \left (8 a^2-4 a b+3 b^2\right ) (c+d x)-\frac {32 a^{5/2} \arctan \left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{\sqrt {a+b}}+8 (a-b) b \sin (2 (c+d x))+b^2 \sin (4 (c+d x))}{32 b^3 d} \]

input
Integrate[Sin[c + d*x]^6/(a + b*Sin[c + d*x]^2),x]
 
output
(4*(8*a^2 - 4*a*b + 3*b^2)*(c + d*x) - (32*a^(5/2)*ArcTan[(Sqrt[a + b]*Tan 
[c + d*x])/Sqrt[a]])/Sqrt[a + b] + 8*(a - b)*b*Sin[2*(c + d*x)] + b^2*Sin[ 
4*(c + d*x)])/(32*b^3*d)
 
3.1.86.3 Rubi [A] (verified)

Time = 0.39 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.23, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {3042, 3666, 372, 440, 397, 216, 218}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\sin ^6(c+d x)}{a+b \sin ^2(c+d x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {\sin (c+d x)^6}{a+b \sin (c+d x)^2}dx\)

\(\Big \downarrow \) 3666

\(\displaystyle \frac {\int \frac {\tan ^6(c+d x)}{\left (\tan ^2(c+d x)+1\right )^3 \left ((a+b) \tan ^2(c+d x)+a\right )}d\tan (c+d x)}{d}\)

\(\Big \downarrow \) 372

\(\displaystyle \frac {\frac {\int \frac {\tan ^2(c+d x) \left (3 a-(a-3 b) \tan ^2(c+d x)\right )}{\left (\tan ^2(c+d x)+1\right )^2 \left ((a+b) \tan ^2(c+d x)+a\right )}d\tan (c+d x)}{4 b}-\frac {\tan ^3(c+d x)}{4 b \left (\tan ^2(c+d x)+1\right )^2}}{d}\)

\(\Big \downarrow \) 440

\(\displaystyle \frac {\frac {\frac {(4 a-3 b) \tan (c+d x)}{2 b \left (\tan ^2(c+d x)+1\right )}-\frac {\int \frac {a (4 a-3 b)-\left (4 a^2-b a+3 b^2\right ) \tan ^2(c+d x)}{\left (\tan ^2(c+d x)+1\right ) \left ((a+b) \tan ^2(c+d x)+a\right )}d\tan (c+d x)}{2 b}}{4 b}-\frac {\tan ^3(c+d x)}{4 b \left (\tan ^2(c+d x)+1\right )^2}}{d}\)

\(\Big \downarrow \) 397

\(\displaystyle \frac {\frac {\frac {(4 a-3 b) \tan (c+d x)}{2 b \left (\tan ^2(c+d x)+1\right )}-\frac {\frac {8 a^3 \int \frac {1}{(a+b) \tan ^2(c+d x)+a}d\tan (c+d x)}{b}-\frac {\left (8 a^2-4 a b+3 b^2\right ) \int \frac {1}{\tan ^2(c+d x)+1}d\tan (c+d x)}{b}}{2 b}}{4 b}-\frac {\tan ^3(c+d x)}{4 b \left (\tan ^2(c+d x)+1\right )^2}}{d}\)

\(\Big \downarrow \) 216

\(\displaystyle \frac {\frac {\frac {(4 a-3 b) \tan (c+d x)}{2 b \left (\tan ^2(c+d x)+1\right )}-\frac {\frac {8 a^3 \int \frac {1}{(a+b) \tan ^2(c+d x)+a}d\tan (c+d x)}{b}-\frac {\left (8 a^2-4 a b+3 b^2\right ) \arctan (\tan (c+d x))}{b}}{2 b}}{4 b}-\frac {\tan ^3(c+d x)}{4 b \left (\tan ^2(c+d x)+1\right )^2}}{d}\)

\(\Big \downarrow \) 218

\(\displaystyle \frac {\frac {\frac {(4 a-3 b) \tan (c+d x)}{2 b \left (\tan ^2(c+d x)+1\right )}-\frac {\frac {8 a^{5/2} \arctan \left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{b \sqrt {a+b}}-\frac {\left (8 a^2-4 a b+3 b^2\right ) \arctan (\tan (c+d x))}{b}}{2 b}}{4 b}-\frac {\tan ^3(c+d x)}{4 b \left (\tan ^2(c+d x)+1\right )^2}}{d}\)

input
Int[Sin[c + d*x]^6/(a + b*Sin[c + d*x]^2),x]
 
output
(-1/4*Tan[c + d*x]^3/(b*(1 + Tan[c + d*x]^2)^2) + (-1/2*(-(((8*a^2 - 4*a*b 
 + 3*b^2)*ArcTan[Tan[c + d*x]])/b) + (8*a^(5/2)*ArcTan[(Sqrt[a + b]*Tan[c 
+ d*x])/Sqrt[a]])/(b*Sqrt[a + b]))/b + ((4*a - 3*b)*Tan[c + d*x])/(2*b*(1 
+ Tan[c + d*x]^2)))/(4*b))/d
 

3.1.86.3.1 Defintions of rubi rules used

rule 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 372
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_ 
), x_Symbol] :> Simp[(-a)*e^3*(e*x)^(m - 3)*(a + b*x^2)^(p + 1)*((c + d*x^2 
)^(q + 1)/(2*b*(b*c - a*d)*(p + 1))), x] + Simp[e^4/(2*b*(b*c - a*d)*(p + 1 
))   Int[(e*x)^(m - 4)*(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[a*c*(m - 3) + 
 (a*d*(m + 2*q - 1) + 2*b*c*(p + 1))*x^2, x], x], x] /; FreeQ[{a, b, c, d, 
e, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && GtQ[m, 3] && IntBinomialQ[a 
, b, c, d, e, m, 2, p, q, x]
 

rule 397
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ 
Symbol] :> Simp[(b*e - a*f)/(b*c - a*d)   Int[1/(a + b*x^2), x], x] - Simp[ 
(d*e - c*f)/(b*c - a*d)   Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e 
, f}, x]
 

rule 440
Int[((g_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_ 
)*((e_) + (f_.)*(x_)^2), x_Symbol] :> Simp[g*(b*e - a*f)*(g*x)^(m - 1)*(a + 
 b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/(2*b*(b*c - a*d)*(p + 1))), x] - Simp[ 
g^2/(2*b*(b*c - a*d)*(p + 1))   Int[(g*x)^(m - 2)*(a + b*x^2)^(p + 1)*(c + 
d*x^2)^q*Simp[c*(b*e - a*f)*(m - 1) + (d*(b*e - a*f)*(m + 2*q + 1) - b*2*(c 
*f - d*e)*(p + 1))*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, q}, x] && 
 LtQ[p, -1] && GtQ[m, 1]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3666
Int[sin[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^( 
p_.), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff^(m + 1 
)/f   Subst[Int[x^m*((a + (a + b)*ff^2*x^2)^p/(1 + ff^2*x^2)^(m/2 + p + 1)) 
, x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[m/2] & 
& IntegerQ[p]
 
3.1.86.4 Maple [A] (verified)

Time = 1.05 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.01

method result size
derivativedivides \(\frac {\frac {\frac {\left (\frac {1}{2} a b -\frac {5}{8} b^{2}\right ) \left (\tan ^{3}\left (d x +c \right )\right )+\left (\frac {1}{2} a b -\frac {3}{8} b^{2}\right ) \tan \left (d x +c \right )}{\left (1+\tan ^{2}\left (d x +c \right )\right )^{2}}+\frac {\left (8 a^{2}-4 a b +3 b^{2}\right ) \arctan \left (\tan \left (d x +c \right )\right )}{8}}{b^{3}}-\frac {a^{3} \arctan \left (\frac {\left (a +b \right ) \tan \left (d x +c \right )}{\sqrt {a \left (a +b \right )}}\right )}{b^{3} \sqrt {a \left (a +b \right )}}}{d}\) \(118\)
default \(\frac {\frac {\frac {\left (\frac {1}{2} a b -\frac {5}{8} b^{2}\right ) \left (\tan ^{3}\left (d x +c \right )\right )+\left (\frac {1}{2} a b -\frac {3}{8} b^{2}\right ) \tan \left (d x +c \right )}{\left (1+\tan ^{2}\left (d x +c \right )\right )^{2}}+\frac {\left (8 a^{2}-4 a b +3 b^{2}\right ) \arctan \left (\tan \left (d x +c \right )\right )}{8}}{b^{3}}-\frac {a^{3} \arctan \left (\frac {\left (a +b \right ) \tan \left (d x +c \right )}{\sqrt {a \left (a +b \right )}}\right )}{b^{3} \sqrt {a \left (a +b \right )}}}{d}\) \(118\)
risch \(\frac {x \,a^{2}}{b^{3}}-\frac {a x}{2 b^{2}}+\frac {3 x}{8 b}-\frac {i {\mathrm e}^{2 i \left (d x +c \right )} a}{8 b^{2} d}+\frac {i {\mathrm e}^{2 i \left (d x +c \right )}}{8 b d}+\frac {i {\mathrm e}^{-2 i \left (d x +c \right )} a}{8 b^{2} d}-\frac {i {\mathrm e}^{-2 i \left (d x +c \right )}}{8 b d}-\frac {\sqrt {-a \left (a +b \right )}\, a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \sqrt {-a \left (a +b \right )}-2 a -b}{b}\right )}{2 \left (a +b \right ) d \,b^{3}}+\frac {\sqrt {-a \left (a +b \right )}\, a^{2} \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \sqrt {-a \left (a +b \right )}+2 a +b}{b}\right )}{2 \left (a +b \right ) d \,b^{3}}+\frac {\sin \left (4 d x +4 c \right )}{32 b d}\) \(227\)

input
int(sin(d*x+c)^6/(a+b*sin(d*x+c)^2),x,method=_RETURNVERBOSE)
 
output
1/d*(1/b^3*(((1/2*a*b-5/8*b^2)*tan(d*x+c)^3+(1/2*a*b-3/8*b^2)*tan(d*x+c))/ 
(1+tan(d*x+c)^2)^2+1/8*(8*a^2-4*a*b+3*b^2)*arctan(tan(d*x+c)))-a^3/b^3/(a* 
(a+b))^(1/2)*arctan((a+b)*tan(d*x+c)/(a*(a+b))^(1/2)))
 
3.1.86.5 Fricas [A] (verification not implemented)

Time = 0.30 (sec) , antiderivative size = 372, normalized size of antiderivative = 3.18 \[ \int \frac {\sin ^6(c+d x)}{a+b \sin ^2(c+d x)} \, dx=\left [\frac {2 \, a^{2} \sqrt {-\frac {a}{a + b}} \log \left (\frac {{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (4 \, a^{2} + 5 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + 4 \, {\left ({\left (2 \, a^{2} + 3 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{3} - {\left (a^{2} + 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )\right )} \sqrt {-\frac {a}{a + b}} \sin \left (d x + c\right ) + a^{2} + 2 \, a b + b^{2}}{b^{2} \cos \left (d x + c\right )^{4} - 2 \, {\left (a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + a^{2} + 2 \, a b + b^{2}}\right ) + {\left (8 \, a^{2} - 4 \, a b + 3 \, b^{2}\right )} d x + {\left (2 \, b^{2} \cos \left (d x + c\right )^{3} + {\left (4 \, a b - 5 \, b^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8 \, b^{3} d}, \frac {4 \, a^{2} \sqrt {\frac {a}{a + b}} \arctan \left (\frac {{\left ({\left (2 \, a + b\right )} \cos \left (d x + c\right )^{2} - a - b\right )} \sqrt {\frac {a}{a + b}}}{2 \, a \cos \left (d x + c\right ) \sin \left (d x + c\right )}\right ) + {\left (8 \, a^{2} - 4 \, a b + 3 \, b^{2}\right )} d x + {\left (2 \, b^{2} \cos \left (d x + c\right )^{3} + {\left (4 \, a b - 5 \, b^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{8 \, b^{3} d}\right ] \]

input
integrate(sin(d*x+c)^6/(a+b*sin(d*x+c)^2),x, algorithm="fricas")
 
output
[1/8*(2*a^2*sqrt(-a/(a + b))*log(((8*a^2 + 8*a*b + b^2)*cos(d*x + c)^4 - 2 
*(4*a^2 + 5*a*b + b^2)*cos(d*x + c)^2 + 4*((2*a^2 + 3*a*b + b^2)*cos(d*x + 
 c)^3 - (a^2 + 2*a*b + b^2)*cos(d*x + c))*sqrt(-a/(a + b))*sin(d*x + c) + 
a^2 + 2*a*b + b^2)/(b^2*cos(d*x + c)^4 - 2*(a*b + b^2)*cos(d*x + c)^2 + a^ 
2 + 2*a*b + b^2)) + (8*a^2 - 4*a*b + 3*b^2)*d*x + (2*b^2*cos(d*x + c)^3 + 
(4*a*b - 5*b^2)*cos(d*x + c))*sin(d*x + c))/(b^3*d), 1/8*(4*a^2*sqrt(a/(a 
+ b))*arctan(1/2*((2*a + b)*cos(d*x + c)^2 - a - b)*sqrt(a/(a + b))/(a*cos 
(d*x + c)*sin(d*x + c))) + (8*a^2 - 4*a*b + 3*b^2)*d*x + (2*b^2*cos(d*x + 
c)^3 + (4*a*b - 5*b^2)*cos(d*x + c))*sin(d*x + c))/(b^3*d)]
 
3.1.86.6 Sympy [F(-1)]

Timed out. \[ \int \frac {\sin ^6(c+d x)}{a+b \sin ^2(c+d x)} \, dx=\text {Timed out} \]

input
integrate(sin(d*x+c)**6/(a+b*sin(d*x+c)**2),x)
 
output
Timed out
 
3.1.86.7 Maxima [A] (verification not implemented)

Time = 0.36 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.09 \[ \int \frac {\sin ^6(c+d x)}{a+b \sin ^2(c+d x)} \, dx=-\frac {\frac {8 \, a^{3} \arctan \left (\frac {{\left (a + b\right )} \tan \left (d x + c\right )}{\sqrt {{\left (a + b\right )} a}}\right )}{\sqrt {{\left (a + b\right )} a} b^{3}} - \frac {{\left (4 \, a - 5 \, b\right )} \tan \left (d x + c\right )^{3} + {\left (4 \, a - 3 \, b\right )} \tan \left (d x + c\right )}{b^{2} \tan \left (d x + c\right )^{4} + 2 \, b^{2} \tan \left (d x + c\right )^{2} + b^{2}} - \frac {{\left (8 \, a^{2} - 4 \, a b + 3 \, b^{2}\right )} {\left (d x + c\right )}}{b^{3}}}{8 \, d} \]

input
integrate(sin(d*x+c)^6/(a+b*sin(d*x+c)^2),x, algorithm="maxima")
 
output
-1/8*(8*a^3*arctan((a + b)*tan(d*x + c)/sqrt((a + b)*a))/(sqrt((a + b)*a)* 
b^3) - ((4*a - 5*b)*tan(d*x + c)^3 + (4*a - 3*b)*tan(d*x + c))/(b^2*tan(d* 
x + c)^4 + 2*b^2*tan(d*x + c)^2 + b^2) - (8*a^2 - 4*a*b + 3*b^2)*(d*x + c) 
/b^3)/d
 
3.1.86.8 Giac [A] (verification not implemented)

Time = 0.43 (sec) , antiderivative size = 157, normalized size of antiderivative = 1.34 \[ \int \frac {\sin ^6(c+d x)}{a+b \sin ^2(c+d x)} \, dx=-\frac {\frac {8 \, {\left (\pi \left \lfloor \frac {d x + c}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a + 2 \, b\right ) + \arctan \left (\frac {a \tan \left (d x + c\right ) + b \tan \left (d x + c\right )}{\sqrt {a^{2} + a b}}\right )\right )} a^{3}}{\sqrt {a^{2} + a b} b^{3}} - \frac {{\left (8 \, a^{2} - 4 \, a b + 3 \, b^{2}\right )} {\left (d x + c\right )}}{b^{3}} - \frac {4 \, a \tan \left (d x + c\right )^{3} - 5 \, b \tan \left (d x + c\right )^{3} + 4 \, a \tan \left (d x + c\right ) - 3 \, b \tan \left (d x + c\right )}{{\left (\tan \left (d x + c\right )^{2} + 1\right )}^{2} b^{2}}}{8 \, d} \]

input
integrate(sin(d*x+c)^6/(a+b*sin(d*x+c)^2),x, algorithm="giac")
 
output
-1/8*(8*(pi*floor((d*x + c)/pi + 1/2)*sgn(2*a + 2*b) + arctan((a*tan(d*x + 
 c) + b*tan(d*x + c))/sqrt(a^2 + a*b)))*a^3/(sqrt(a^2 + a*b)*b^3) - (8*a^2 
 - 4*a*b + 3*b^2)*(d*x + c)/b^3 - (4*a*tan(d*x + c)^3 - 5*b*tan(d*x + c)^3 
 + 4*a*tan(d*x + c) - 3*b*tan(d*x + c))/((tan(d*x + c)^2 + 1)^2*b^2))/d
 
3.1.86.9 Mupad [B] (verification not implemented)

Time = 14.19 (sec) , antiderivative size = 1892, normalized size of antiderivative = 16.17 \[ \int \frac {\sin ^6(c+d x)}{a+b \sin ^2(c+d x)} \, dx=\text {Too large to display} \]

input
int(sin(c + d*x)^6/(a + b*sin(c + d*x)^2),x)
 
output
((tan(c + d*x)*(4*a - 3*b))/(8*b^2) + (tan(c + d*x)^3*(4*a - 5*b))/(8*b^2) 
)/(d*(2*tan(c + d*x)^2 + tan(c + d*x)^4 + 1)) - (atan((((((((3*a*b^9)/2 + 
a^2*b^8 - (5*a^3*b^7)/2 - 2*a^4*b^6)/(2*b^6) - (tan(c + d*x)*(-a^5*(a + b) 
)^(1/2)*(1024*a*b^8 + 256*b^9 + 1280*a^2*b^7 + 512*a^3*b^6))/(128*b^4*(a*b 
^3 + b^4)))*(-a^5*(a + b))^(1/2))/(2*(a*b^3 + b^4)) - (tan(c + d*x)*(3*a*b 
^6 + 192*a^6*b + 128*a^7 + 9*b^7 + 19*a^2*b^5 + 65*a^3*b^4 + 40*a^4*b^3 + 
64*a^5*b^2))/(64*b^4))*(-a^5*(a + b))^(1/2)*1i)/(a*b^3 + b^4) - ((((((3*a* 
b^9)/2 + a^2*b^8 - (5*a^3*b^7)/2 - 2*a^4*b^6)/(2*b^6) + (tan(c + d*x)*(-a^ 
5*(a + b))^(1/2)*(1024*a*b^8 + 256*b^9 + 1280*a^2*b^7 + 512*a^3*b^6))/(128 
*b^4*(a*b^3 + b^4)))*(-a^5*(a + b))^(1/2))/(2*(a*b^3 + b^4)) + (tan(c + d* 
x)*(3*a*b^6 + 192*a^6*b + 128*a^7 + 9*b^7 + 19*a^2*b^5 + 65*a^3*b^4 + 40*a 
^4*b^3 + 64*a^5*b^2))/(64*b^4))*(-a^5*(a + b))^(1/2)*1i)/(a*b^3 + b^4))/(( 
(((((3*a*b^9)/2 + a^2*b^8 - (5*a^3*b^7)/2 - 2*a^4*b^6)/(2*b^6) - (tan(c + 
d*x)*(-a^5*(a + b))^(1/2)*(1024*a*b^8 + 256*b^9 + 1280*a^2*b^7 + 512*a^3*b 
^6))/(128*b^4*(a*b^3 + b^4)))*(-a^5*(a + b))^(1/2))/(2*(a*b^3 + b^4)) - (t 
an(c + d*x)*(3*a*b^6 + 192*a^6*b + 128*a^7 + 9*b^7 + 19*a^2*b^5 + 65*a^3*b 
^4 + 40*a^4*b^3 + 64*a^5*b^2))/(64*b^4))*(-a^5*(a + b))^(1/2))/(a*b^3 + b^ 
4) - ((a^7*b)/4 + a^8 + (9*a^3*b^5)/32 - (3*a^4*b^4)/16 + (25*a^5*b^3)/32 
+ (a^6*b^2)/2)/b^6 + ((((((3*a*b^9)/2 + a^2*b^8 - (5*a^3*b^7)/2 - 2*a^4*b^ 
6)/(2*b^6) + (tan(c + d*x)*(-a^5*(a + b))^(1/2)*(1024*a*b^8 + 256*b^9 +...